\(\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx\) [324]
Optimal result
Integrand size = 24, antiderivative size = 190 \[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=-\frac {4 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \text {arctanh}(\cos (2 a+2 b x))}{b^3}-\frac {2 d (c+d x) \csc (2 a+2 b x)}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x) \csc (2 a+2 b x)}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}+\frac {d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{b^3}
\]
[Out]
-4*(d*x+c)^2*arctanh(exp(2*I*(b*x+a)))/b-d^2*arctanh(cos(2*b*x+2*a))/b^3-2*d*(d*x+c)*csc(2*b*x+2*a)/b^2-2*(d*x
+c)^2*cot(2*b*x+2*a)*csc(2*b*x+2*a)/b+2*I*d*(d*x+c)*polylog(2,-exp(2*I*(b*x+a)))/b^2-2*I*d*(d*x+c)*polylog(2,e
xp(2*I*(b*x+a)))/b^2-d^2*polylog(3,-exp(2*I*(b*x+a)))/b^3+d^2*polylog(3,exp(2*I*(b*x+a)))/b^3
Rubi [A] (verified)
Time = 0.23 (sec) , antiderivative size = 190, normalized size of antiderivative = 1.00, number of
steps used = 10, number of rules used = 7, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.292, Rules used = {4504, 4271, 3855, 4268, 2611,
2320, 6724} \[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=-\frac {d^2 \text {arctanh}(\cos (2 a+2 b x))}{b^3}-\frac {4 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}+\frac {d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{b^3}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {2 d (c+d x) \csc (2 a+2 b x)}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x) \csc (2 a+2 b x)}{b}
\]
[In]
Int[(c + d*x)^2*Csc[a + b*x]^3*Sec[a + b*x]^3,x]
[Out]
(-4*(c + d*x)^2*ArcTanh[E^((2*I)*(a + b*x))])/b - (d^2*ArcTanh[Cos[2*a + 2*b*x]])/b^3 - (2*d*(c + d*x)*Csc[2*a
+ 2*b*x])/b^2 - (2*(c + d*x)^2*Cot[2*a + 2*b*x]*Csc[2*a + 2*b*x])/b + ((2*I)*d*(c + d*x)*PolyLog[2, -E^((2*I)
*(a + b*x))])/b^2 - ((2*I)*d*(c + d*x)*PolyLog[2, E^((2*I)*(a + b*x))])/b^2 - (d^2*PolyLog[3, -E^((2*I)*(a + b
*x))])/b^3 + (d^2*PolyLog[3, E^((2*I)*(a + b*x))])/b^3
Rule 2320
Int[u_, x_Symbol] :> With[{v = FunctionOfExponential[u, x]}, Dist[v/D[v, x], Subst[Int[FunctionOfExponentialFu
nction[u, x]/x, x], x, v], x]] /; FunctionOfExponentialQ[u, x] && !MatchQ[u, (w_)*((a_.)*(v_)^(n_))^(m_) /; F
reeQ[{a, m, n}, x] && IntegerQ[m*n]] && !MatchQ[u, E^((c_.)*((a_.) + (b_.)*x))*(F_)[v_] /; FreeQ[{a, b, c}, x
] && InverseFunctionQ[F[x]]]
Rule 2611
Int[Log[1 + (e_.)*((F_)^((c_.)*((a_.) + (b_.)*(x_))))^(n_.)]*((f_.) + (g_.)*(x_))^(m_.), x_Symbol] :> Simp[(-(
f + g*x)^m)*(PolyLog[2, (-e)*(F^(c*(a + b*x)))^n]/(b*c*n*Log[F])), x] + Dist[g*(m/(b*c*n*Log[F])), Int[(f + g*
x)^(m - 1)*PolyLog[2, (-e)*(F^(c*(a + b*x)))^n], x], x] /; FreeQ[{F, a, b, c, e, f, g, n}, x] && GtQ[m, 0]
Rule 3855
Int[csc[(c_.) + (d_.)*(x_)], x_Symbol] :> Simp[-ArcTanh[Cos[c + d*x]]/d, x] /; FreeQ[{c, d}, x]
Rule 4268
Int[csc[(e_.) + (f_.)*(x_)]*((c_.) + (d_.)*(x_))^(m_.), x_Symbol] :> Simp[-2*(c + d*x)^m*(ArcTanh[E^(I*(e + f*
x))]/f), x] + (-Dist[d*(m/f), Int[(c + d*x)^(m - 1)*Log[1 - E^(I*(e + f*x))], x], x] + Dist[d*(m/f), Int[(c +
d*x)^(m - 1)*Log[1 + E^(I*(e + f*x))], x], x]) /; FreeQ[{c, d, e, f}, x] && IGtQ[m, 0]
Rule 4271
Int[(csc[(e_.) + (f_.)*(x_)]*(b_.))^(n_)*((c_.) + (d_.)*(x_))^(m_), x_Symbol] :> Simp[(-b^2)*(c + d*x)^m*Cot[e
+ f*x]*((b*Csc[e + f*x])^(n - 2)/(f*(n - 1))), x] + (Dist[b^2*d^2*m*((m - 1)/(f^2*(n - 1)*(n - 2))), Int[(c +
d*x)^(m - 2)*(b*Csc[e + f*x])^(n - 2), x], x] + Dist[b^2*((n - 2)/(n - 1)), Int[(c + d*x)^m*(b*Csc[e + f*x])^
(n - 2), x], x] - Simp[b^2*d*m*(c + d*x)^(m - 1)*((b*Csc[e + f*x])^(n - 2)/(f^2*(n - 1)*(n - 2))), x]) /; Free
Q[{b, c, d, e, f}, x] && GtQ[n, 1] && NeQ[n, 2] && GtQ[m, 1]
Rule 4504
Int[Csc[(a_.) + (b_.)*(x_)]^(n_.)*((c_.) + (d_.)*(x_))^(m_.)*Sec[(a_.) + (b_.)*(x_)]^(n_.), x_Symbol] :> Dist[
2^n, Int[(c + d*x)^m*Csc[2*a + 2*b*x]^n, x], x] /; FreeQ[{a, b, c, d, m}, x] && IntegerQ[n] && RationalQ[m]
Rule 6724
Int[PolyLog[n_, (c_.)*((a_.) + (b_.)*(x_))^(p_.)]/((d_.) + (e_.)*(x_)), x_Symbol] :> Simp[PolyLog[n + 1, c*(a
+ b*x)^p]/(e*p), x] /; FreeQ[{a, b, c, d, e, n, p}, x] && EqQ[b*d, a*e]
Rubi steps \begin{align*}
\text {integral}& = 8 \int (c+d x)^2 \csc ^3(2 a+2 b x) \, dx \\ & = -\frac {2 d (c+d x) \csc (2 a+2 b x)}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x) \csc (2 a+2 b x)}{b}+4 \int (c+d x)^2 \csc (2 a+2 b x) \, dx+\frac {\left (2 d^2\right ) \int \csc (2 a+2 b x) \, dx}{b^2} \\ & = -\frac {4 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \text {arctanh}(\cos (2 a+2 b x))}{b^3}-\frac {2 d (c+d x) \csc (2 a+2 b x)}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x) \csc (2 a+2 b x)}{b}-\frac {(4 d) \int (c+d x) \log \left (1-e^{i (2 a+2 b x)}\right ) \, dx}{b}+\frac {(4 d) \int (c+d x) \log \left (1+e^{i (2 a+2 b x)}\right ) \, dx}{b} \\ & = -\frac {4 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \text {arctanh}(\cos (2 a+2 b x))}{b^3}-\frac {2 d (c+d x) \csc (2 a+2 b x)}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x) \csc (2 a+2 b x)}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {\left (2 i d^2\right ) \int \operatorname {PolyLog}\left (2,-e^{i (2 a+2 b x)}\right ) \, dx}{b^2}+\frac {\left (2 i d^2\right ) \int \operatorname {PolyLog}\left (2,e^{i (2 a+2 b x)}\right ) \, dx}{b^2} \\ & = -\frac {4 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \text {arctanh}(\cos (2 a+2 b x))}{b^3}-\frac {2 d (c+d x) \csc (2 a+2 b x)}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x) \csc (2 a+2 b x)}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,-x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{b^3}+\frac {d^2 \text {Subst}\left (\int \frac {\operatorname {PolyLog}(2,x)}{x} \, dx,x,e^{i (2 a+2 b x)}\right )}{b^3} \\ & = -\frac {4 (c+d x)^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )}{b}-\frac {d^2 \text {arctanh}(\cos (2 a+2 b x))}{b^3}-\frac {2 d (c+d x) \csc (2 a+2 b x)}{b^2}-\frac {2 (c+d x)^2 \cot (2 a+2 b x) \csc (2 a+2 b x)}{b}+\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )}{b^2}-\frac {2 i d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )}{b^2}-\frac {d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )}{b^3}+\frac {d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{b^3} \\
\end{align*}
Mathematica [B] (verified)
Both result and optimal contain complex but leaf count is larger than twice the leaf count of
optimal. \(381\) vs. \(2(190)=380\).
Time = 7.57 (sec) , antiderivative size = 381, normalized size of antiderivative = 2.01
\[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=8 \left (-\frac {d (c+d x) \csc (2 a)}{4 b^2}+\frac {\left (-c^2-2 c d x-d^2 x^2\right ) \csc ^2(a+b x)}{16 b}-\frac {4 b^2 c^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )+2 d^2 \text {arctanh}\left (e^{2 i (a+b x)}\right )-4 b^2 c d x \log \left (1-e^{2 i (a+b x)}\right )-2 b^2 d^2 x^2 \log \left (1-e^{2 i (a+b x)}\right )+4 b^2 c d x \log \left (1+e^{2 i (a+b x)}\right )+2 b^2 d^2 x^2 \log \left (1+e^{2 i (a+b x)}\right )-2 i b d (c+d x) \operatorname {PolyLog}\left (2,-e^{2 i (a+b x)}\right )+2 i b d (c+d x) \operatorname {PolyLog}\left (2,e^{2 i (a+b x)}\right )+d^2 \operatorname {PolyLog}\left (3,-e^{2 i (a+b x)}\right )-d^2 \operatorname {PolyLog}\left (3,e^{2 i (a+b x)}\right )}{8 b^3}+\frac {\left (c^2+2 c d x+d^2 x^2\right ) \sec ^2(a+b x)}{16 b}+\frac {\sec (a) \sec (a+b x) \left (-c d \sin (b x)-d^2 x \sin (b x)\right )}{8 b^2}+\frac {\csc (a) \csc (a+b x) \left (c d \sin (b x)+d^2 x \sin (b x)\right )}{8 b^2}\right )
\]
[In]
Integrate[(c + d*x)^2*Csc[a + b*x]^3*Sec[a + b*x]^3,x]
[Out]
8*(-1/4*(d*(c + d*x)*Csc[2*a])/b^2 + ((-c^2 - 2*c*d*x - d^2*x^2)*Csc[a + b*x]^2)/(16*b) - (4*b^2*c^2*ArcTanh[E
^((2*I)*(a + b*x))] + 2*d^2*ArcTanh[E^((2*I)*(a + b*x))] - 4*b^2*c*d*x*Log[1 - E^((2*I)*(a + b*x))] - 2*b^2*d^
2*x^2*Log[1 - E^((2*I)*(a + b*x))] + 4*b^2*c*d*x*Log[1 + E^((2*I)*(a + b*x))] + 2*b^2*d^2*x^2*Log[1 + E^((2*I)
*(a + b*x))] - (2*I)*b*d*(c + d*x)*PolyLog[2, -E^((2*I)*(a + b*x))] + (2*I)*b*d*(c + d*x)*PolyLog[2, E^((2*I)*
(a + b*x))] + d^2*PolyLog[3, -E^((2*I)*(a + b*x))] - d^2*PolyLog[3, E^((2*I)*(a + b*x))])/(8*b^3) + ((c^2 + 2*
c*d*x + d^2*x^2)*Sec[a + b*x]^2)/(16*b) + (Sec[a]*Sec[a + b*x]*(-(c*d*Sin[b*x]) - d^2*x*Sin[b*x]))/(8*b^2) + (
Csc[a]*Csc[a + b*x]*(c*d*Sin[b*x] + d^2*x*Sin[b*x]))/(8*b^2))
Maple [B] (verified)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 715 vs. \(2 (178 ) = 356\).
Time = 0.96 (sec) , antiderivative size = 716, normalized size of antiderivative = 3.77
| | |
method | result | size |
| | |
risch |
\(-\frac {4 i d^{2} \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{2}}-\frac {4 i d c \operatorname {polylog}\left (2, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}+\frac {4 d c \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b}+\frac {4 d c \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a}{b^{2}}+\frac {4 d^{2} \operatorname {polylog}\left (3, {\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}+\frac {4 d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{3}}+\frac {2 c^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{b}+\frac {2 d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x^{2}}{b}-\frac {2 d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x^{2}}{b}+\frac {2 i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right ) x}{b^{2}}-\frac {4 c d \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right ) x}{b}+\frac {2 d^{2} a^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b^{3}}+\frac {2 d^{2} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) x^{2}}{b}-\frac {d^{2} \operatorname {polylog}\left (3, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{3}}+\frac {2 c^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right )}{b^{3}}+\frac {d^{2} \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b^{3}}+\frac {4 x^{2} d^{2} b \,{\mathrm e}^{6 i \left (x b +a \right )}+8 c d x b \,{\mathrm e}^{6 i \left (x b +a \right )}+4 c^{2} b \,{\mathrm e}^{6 i \left (x b +a \right )}-4 i d^{2} x \,{\mathrm e}^{6 i \left (x b +a \right )}+4 b \,d^{2} x^{2} {\mathrm e}^{2 i \left (x b +a \right )}-4 i c d \,{\mathrm e}^{6 i \left (x b +a \right )}+8 b c d x \,{\mathrm e}^{2 i \left (x b +a \right )}+4 b \,c^{2} {\mathrm e}^{2 i \left (x b +a \right )}+4 i d^{2} x \,{\mathrm e}^{2 i \left (x b +a \right )}+4 i c d \,{\mathrm e}^{2 i \left (x b +a \right )}}{b^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )^{2} \left ({\mathrm e}^{2 i \left (x b +a \right )}-1\right )^{2}}-\frac {2 d^{2} \ln \left (1-{\mathrm e}^{i \left (x b +a \right )}\right ) a^{2}}{b^{3}}+\frac {2 i c d \operatorname {polylog}\left (2, -{\mathrm e}^{2 i \left (x b +a \right )}\right )}{b^{2}}+\frac {4 d c \ln \left ({\mathrm e}^{i \left (x b +a \right )}+1\right ) x}{b}-\frac {d^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b^{3}}-\frac {4 c d a \ln \left ({\mathrm e}^{i \left (x b +a \right )}-1\right )}{b^{2}}-\frac {2 c^{2} \ln \left ({\mathrm e}^{2 i \left (x b +a \right )}+1\right )}{b}-\frac {4 i c d \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right )}{b^{2}}-\frac {4 i d^{2} \operatorname {polylog}\left (2, -{\mathrm e}^{i \left (x b +a \right )}\right ) x}{b^{2}}\) |
\(716\) |
| | |
|
|
|
[In]
int((d*x+c)^2*csc(b*x+a)^3*sec(b*x+a)^3,x,method=_RETURNVERBOSE)
[Out]
-2/b*d^2*ln(exp(2*I*(b*x+a))+1)*x^2+2/b^3*d^2*a^2*ln(exp(I*(b*x+a))-1)-1/b^3*d^2*ln(exp(2*I*(b*x+a))+1)+2/b*c^
2*ln(exp(I*(b*x+a))+1)+2/b*c^2*ln(exp(I*(b*x+a))-1)-2/b^3*d^2*ln(1-exp(I*(b*x+a)))*a^2+2/b*d^2*ln(1-exp(I*(b*x
+a)))*x^2+2/b*d^2*ln(exp(I*(b*x+a))+1)*x^2-2/b*c^2*ln(exp(2*I*(b*x+a))+1)+4/b*d*c*ln(exp(I*(b*x+a))+1)*x+4/b^2
*d*c*ln(1-exp(I*(b*x+a)))*a-4/b^2*c*d*a*ln(exp(I*(b*x+a))-1)+4/b*d*c*ln(1-exp(I*(b*x+a)))*x-d^2*polylog(3,-exp
(2*I*(b*x+a)))/b^3-4/b*c*d*ln(exp(2*I*(b*x+a))+1)*x+4*d^2*polylog(3,-exp(I*(b*x+a)))/b^3+4*d^2*polylog(3,exp(I
*(b*x+a)))/b^3+1/b^3*d^2*ln(exp(I*(b*x+a))+1)+1/b^3*d^2*ln(exp(I*(b*x+a))-1)+4/b^2/(exp(2*I*(b*x+a))+1)^2/(exp
(2*I*(b*x+a))-1)^2*(x^2*d^2*b*exp(6*I*(b*x+a))+2*c*d*x*b*exp(6*I*(b*x+a))+c^2*b*exp(6*I*(b*x+a))-I*d^2*x*exp(6
*I*(b*x+a))+b*d^2*x^2*exp(2*I*(b*x+a))-I*c*d*exp(6*I*(b*x+a))+2*b*c*d*x*exp(2*I*(b*x+a))+b*c^2*exp(2*I*(b*x+a)
)+I*d^2*x*exp(2*I*(b*x+a))+I*c*d*exp(2*I*(b*x+a)))+2*I/b^2*d^2*polylog(2,-exp(2*I*(b*x+a)))*x-4*I/b^2*d^2*poly
log(2,exp(I*(b*x+a)))*x-4*I/b^2*c*d*polylog(2,-exp(I*(b*x+a)))-4*I/b^2*d^2*polylog(2,-exp(I*(b*x+a)))*x+2*I/b^
2*c*d*polylog(2,-exp(2*I*(b*x+a)))-4*I/b^2*c*d*polylog(2,exp(I*(b*x+a)))
Fricas [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 2387 vs. \(2 (174) = 348\).
Time = 0.40 (sec) , antiderivative size = 2387, normalized size of antiderivative = 12.56
\[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*csc(b*x+a)^3*sec(b*x+a)^3,x, algorithm="fricas")
[Out]
-1/2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2 - 2*(b^2*d^2*x^2 + 2*b^2*c*d*x + b^2*c^2)*cos(b*x + a)^2 - 2*(b*d^2*
x + b*c*d)*cos(b*x + a)*sin(b*x + a) + 4*((I*b*d^2*x + I*b*c*d)*cos(b*x + a)^4 + (-I*b*d^2*x - I*b*c*d)*cos(b*
x + a)^2)*dilog(cos(b*x + a) + I*sin(b*x + a)) + 4*((-I*b*d^2*x - I*b*c*d)*cos(b*x + a)^4 + (I*b*d^2*x + I*b*c
*d)*cos(b*x + a)^2)*dilog(cos(b*x + a) - I*sin(b*x + a)) + 4*((I*b*d^2*x + I*b*c*d)*cos(b*x + a)^4 + (-I*b*d^2
*x - I*b*c*d)*cos(b*x + a)^2)*dilog(I*cos(b*x + a) + sin(b*x + a)) + 4*((-I*b*d^2*x - I*b*c*d)*cos(b*x + a)^4
+ (I*b*d^2*x + I*b*c*d)*cos(b*x + a)^2)*dilog(I*cos(b*x + a) - sin(b*x + a)) + 4*((-I*b*d^2*x - I*b*c*d)*cos(b
*x + a)^4 + (I*b*d^2*x + I*b*c*d)*cos(b*x + a)^2)*dilog(-I*cos(b*x + a) + sin(b*x + a)) + 4*((I*b*d^2*x + I*b*
c*d)*cos(b*x + a)^4 + (-I*b*d^2*x - I*b*c*d)*cos(b*x + a)^2)*dilog(-I*cos(b*x + a) - sin(b*x + a)) + 4*((-I*b*
d^2*x - I*b*c*d)*cos(b*x + a)^4 + (I*b*d^2*x + I*b*c*d)*cos(b*x + a)^2)*dilog(-cos(b*x + a) + I*sin(b*x + a))
+ 4*((I*b*d^2*x + I*b*c*d)*cos(b*x + a)^4 + (-I*b*d^2*x - I*b*c*d)*cos(b*x + a)^2)*dilog(-cos(b*x + a) - I*sin
(b*x + a)) - ((2*b^2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 + d^2)*cos(b*x + a)^4 - (2*b^2*d^2*x^2 + 4*b^2*c*d*x +
2*b^2*c^2 + d^2)*cos(b*x + a)^2)*log(cos(b*x + a) + I*sin(b*x + a) + 1) + ((2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1
)*d^2)*cos(b*x + a)^4 - (2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^2)*log(cos(b*x + a) + I*sin(b*x
+ a) + I) - ((2*b^2*d^2*x^2 + 4*b^2*c*d*x + 2*b^2*c^2 + d^2)*cos(b*x + a)^4 - (2*b^2*d^2*x^2 + 4*b^2*c*d*x +
2*b^2*c^2 + d^2)*cos(b*x + a)^2)*log(cos(b*x + a) - I*sin(b*x + a) + 1) + ((2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1
)*d^2)*cos(b*x + a)^4 - (2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^2)*log(cos(b*x + a) - I*sin(b*x
+ a) + I) + 2*((b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^4 - (b^2*d^2*x^2 + 2*b^2*c*d*x
+ 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^2)*log(I*cos(b*x + a) + sin(b*x + a) + 1) + 2*((b^2*d^2*x^2 + 2*b^2*c*d*x
+ 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^4 - (b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^2)*log(
I*cos(b*x + a) - sin(b*x + a) + 1) + 2*((b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^4 - (b^
2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^2)*log(-I*cos(b*x + a) + sin(b*x + a) + 1) + 2*((b
^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^4 - (b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*
d^2)*cos(b*x + a)^2)*log(-I*cos(b*x + a) - sin(b*x + a) + 1) - ((2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(
b*x + a)^4 - (2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^2)*log(-1/2*cos(b*x + a) + 1/2*I*sin(b*x +
a) + 1/2) - ((2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^4 - (2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*
d^2)*cos(b*x + a)^2)*log(-1/2*cos(b*x + a) - 1/2*I*sin(b*x + a) + 1/2) - 2*((b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b
*c*d - a^2*d^2)*cos(b*x + a)^4 - (b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^2)*log(-cos(b*
x + a) + I*sin(b*x + a) + 1) + ((2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^4 - (2*b^2*c^2 - 4*a*b*
c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^2)*log(-cos(b*x + a) + I*sin(b*x + a) + I) - 2*((b^2*d^2*x^2 + 2*b^2*c*d*x
+ 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^4 - (b^2*d^2*x^2 + 2*b^2*c*d*x + 2*a*b*c*d - a^2*d^2)*cos(b*x + a)^2)*log
(-cos(b*x + a) - I*sin(b*x + a) + 1) + ((2*b^2*c^2 - 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^4 - (2*b^2*c^2
- 4*a*b*c*d + (2*a^2 + 1)*d^2)*cos(b*x + a)^2)*log(-cos(b*x + a) - I*sin(b*x + a) + I) - 4*(d^2*cos(b*x + a)^4
- d^2*cos(b*x + a)^2)*polylog(3, cos(b*x + a) + I*sin(b*x + a)) - 4*(d^2*cos(b*x + a)^4 - d^2*cos(b*x + a)^2)
*polylog(3, cos(b*x + a) - I*sin(b*x + a)) + 4*(d^2*cos(b*x + a)^4 - d^2*cos(b*x + a)^2)*polylog(3, I*cos(b*x
+ a) + sin(b*x + a)) + 4*(d^2*cos(b*x + a)^4 - d^2*cos(b*x + a)^2)*polylog(3, I*cos(b*x + a) - sin(b*x + a)) +
4*(d^2*cos(b*x + a)^4 - d^2*cos(b*x + a)^2)*polylog(3, -I*cos(b*x + a) + sin(b*x + a)) + 4*(d^2*cos(b*x + a)^
4 - d^2*cos(b*x + a)^2)*polylog(3, -I*cos(b*x + a) - sin(b*x + a)) - 4*(d^2*cos(b*x + a)^4 - d^2*cos(b*x + a)^
2)*polylog(3, -cos(b*x + a) + I*sin(b*x + a)) - 4*(d^2*cos(b*x + a)^4 - d^2*cos(b*x + a)^2)*polylog(3, -cos(b*
x + a) - I*sin(b*x + a)))/(b^3*cos(b*x + a)^4 - b^3*cos(b*x + a)^2)
Sympy [F(-1)]
Timed out. \[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=\text {Timed out}
\]
[In]
integrate((d*x+c)**2*csc(b*x+a)**3*sec(b*x+a)**3,x)
[Out]
Timed out
Maxima [B] (verification not implemented)
Both result and optimal contain complex but leaf count of result is larger than twice the leaf
count of optimal. 2728 vs. \(2 (174) = 348\).
Time = 0.76 (sec) , antiderivative size = 2728, normalized size of antiderivative = 14.36
\[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=\text {Too large to display}
\]
[In]
integrate((d*x+c)^2*csc(b*x+a)^3*sec(b*x+a)^3,x, algorithm="maxima")
[Out]
-1/2*(c^2*((2*sin(b*x + a)^2 - 1)/(sin(b*x + a)^4 - sin(b*x + a)^2) + 2*log(sin(b*x + a)^2 - 1) - 2*log(sin(b*
x + a)^2)) - 2*a*c*d*((2*sin(b*x + a)^2 - 1)/(sin(b*x + a)^4 - sin(b*x + a)^2) + 2*log(sin(b*x + a)^2 - 1) - 2
*log(sin(b*x + a)^2))/b + a^2*d^2*((2*sin(b*x + a)^2 - 1)/(sin(b*x + a)^4 - sin(b*x + a)^2) + 2*log(sin(b*x +
a)^2 - 1) - 2*log(sin(b*x + a)^2))/b^2 + 2*(2*(2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a) + d^2 + (2*(b*x
+ a)^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a) + d^2)*cos(8*b*x + 8*a) - 2*(2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(
b*x + a) + d^2)*cos(4*b*x + 4*a) - (-2*I*(b*x + a)^2*d^2 + 4*(-I*b*c*d + I*a*d^2)*(b*x + a) - I*d^2)*sin(8*b*x
+ 8*a) - 2*(2*I*(b*x + a)^2*d^2 + 4*(I*b*c*d - I*a*d^2)*(b*x + a) + I*d^2)*sin(4*b*x + 4*a))*arctan2(sin(2*b*
x + 2*a), cos(2*b*x + 2*a) + 1) - 2*(2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a) + d^2 + (2*(b*x + a)^2*d^
2 + 4*(b*c*d - a*d^2)*(b*x + a) + d^2)*cos(8*b*x + 8*a) - 2*(2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a) +
d^2)*cos(4*b*x + 4*a) + (2*I*(b*x + a)^2*d^2 + 4*(I*b*c*d - I*a*d^2)*(b*x + a) + I*d^2)*sin(8*b*x + 8*a) + 2*
(-2*I*(b*x + a)^2*d^2 + 4*(-I*b*c*d + I*a*d^2)*(b*x + a) - I*d^2)*sin(4*b*x + 4*a))*arctan2(sin(b*x + a), cos(
b*x + a) + 1) - 2*(d^2*cos(8*b*x + 8*a) - 2*d^2*cos(4*b*x + 4*a) + I*d^2*sin(8*b*x + 8*a) - 2*I*d^2*sin(4*b*x
+ 4*a) + d^2)*arctan2(sin(b*x + a), cos(b*x + a) - 1) + 4*((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a) + ((b
*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x + a))*cos(8*b*x + 8*a) - 2*((b*x + a)^2*d^2 + 2*(b*c*d - a*d^2)*(b*x +
a))*cos(4*b*x + 4*a) - (-I*(b*x + a)^2*d^2 + 2*(-I*b*c*d + I*a*d^2)*(b*x + a))*sin(8*b*x + 8*a) - 2*(I*(b*x +
a)^2*d^2 + 2*(I*b*c*d - I*a*d^2)*(b*x + a))*sin(4*b*x + 4*a))*arctan2(sin(b*x + a), -cos(b*x + a) + 1) - 8*(-I
*(b*x + a)^2*d^2 - b*c*d + a*d^2 + (-2*I*b*c*d + (2*I*a - 1)*d^2)*(b*x + a))*cos(6*b*x + 6*a) - 8*(-I*(b*x + a
)^2*d^2 + b*c*d - a*d^2 + (-2*I*b*c*d + (2*I*a + 1)*d^2)*(b*x + a))*cos(2*b*x + 2*a) - 4*(b*c*d + (b*x + a)*d^
2 - a*d^2 + (b*c*d + (b*x + a)*d^2 - a*d^2)*cos(8*b*x + 8*a) - 2*(b*c*d + (b*x + a)*d^2 - a*d^2)*cos(4*b*x + 4
*a) + (I*b*c*d + I*(b*x + a)*d^2 - I*a*d^2)*sin(8*b*x + 8*a) + 2*(-I*b*c*d - I*(b*x + a)*d^2 + I*a*d^2)*sin(4*
b*x + 4*a))*dilog(-e^(2*I*b*x + 2*I*a)) + 8*(b*c*d + (b*x + a)*d^2 - a*d^2 + (b*c*d + (b*x + a)*d^2 - a*d^2)*c
os(8*b*x + 8*a) - 2*(b*c*d + (b*x + a)*d^2 - a*d^2)*cos(4*b*x + 4*a) - (-I*b*c*d - I*(b*x + a)*d^2 + I*a*d^2)*
sin(8*b*x + 8*a) - 2*(I*b*c*d + I*(b*x + a)*d^2 - I*a*d^2)*sin(4*b*x + 4*a))*dilog(-e^(I*b*x + I*a)) + 8*(b*c*
d + (b*x + a)*d^2 - a*d^2 + (b*c*d + (b*x + a)*d^2 - a*d^2)*cos(8*b*x + 8*a) - 2*(b*c*d + (b*x + a)*d^2 - a*d^
2)*cos(4*b*x + 4*a) - (-I*b*c*d - I*(b*x + a)*d^2 + I*a*d^2)*sin(8*b*x + 8*a) - 2*(I*b*c*d + I*(b*x + a)*d^2 -
I*a*d^2)*sin(4*b*x + 4*a))*dilog(e^(I*b*x + I*a)) + (-2*I*(b*x + a)^2*d^2 - 4*(I*b*c*d - I*a*d^2)*(b*x + a) -
I*d^2 + (-2*I*(b*x + a)^2*d^2 - 4*(I*b*c*d - I*a*d^2)*(b*x + a) - I*d^2)*cos(8*b*x + 8*a) - 2*(-2*I*(b*x + a)
^2*d^2 + 4*(-I*b*c*d + I*a*d^2)*(b*x + a) - I*d^2)*cos(4*b*x + 4*a) + (2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(
b*x + a) + d^2)*sin(8*b*x + 8*a) - 2*(2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a) + d^2)*sin(4*b*x + 4*a))
*log(cos(2*b*x + 2*a)^2 + sin(2*b*x + 2*a)^2 + 2*cos(2*b*x + 2*a) + 1) + (2*I*(b*x + a)^2*d^2 - 4*(-I*b*c*d +
I*a*d^2)*(b*x + a) + I*d^2 + (2*I*(b*x + a)^2*d^2 - 4*(-I*b*c*d + I*a*d^2)*(b*x + a) + I*d^2)*cos(8*b*x + 8*a)
- 2*(2*I*(b*x + a)^2*d^2 + 4*(I*b*c*d - I*a*d^2)*(b*x + a) + I*d^2)*cos(4*b*x + 4*a) - (2*(b*x + a)^2*d^2 + 4
*(b*c*d - a*d^2)*(b*x + a) + d^2)*sin(8*b*x + 8*a) + 2*(2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a) + d^2)
*sin(4*b*x + 4*a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 + 2*cos(b*x + a) + 1) + (2*I*(b*x + a)^2*d^2 - 4*(-I*b*
c*d + I*a*d^2)*(b*x + a) + I*d^2 + (2*I*(b*x + a)^2*d^2 - 4*(-I*b*c*d + I*a*d^2)*(b*x + a) + I*d^2)*cos(8*b*x
+ 8*a) - 2*(2*I*(b*x + a)^2*d^2 + 4*(I*b*c*d - I*a*d^2)*(b*x + a) + I*d^2)*cos(4*b*x + 4*a) - (2*(b*x + a)^2*d
^2 + 4*(b*c*d - a*d^2)*(b*x + a) + d^2)*sin(8*b*x + 8*a) + 2*(2*(b*x + a)^2*d^2 + 4*(b*c*d - a*d^2)*(b*x + a)
+ d^2)*sin(4*b*x + 4*a))*log(cos(b*x + a)^2 + sin(b*x + a)^2 - 2*cos(b*x + a) + 1) - 2*(I*d^2*cos(8*b*x + 8*a)
- 2*I*d^2*cos(4*b*x + 4*a) - d^2*sin(8*b*x + 8*a) + 2*d^2*sin(4*b*x + 4*a) + I*d^2)*polylog(3, -e^(2*I*b*x +
2*I*a)) - 8*(-I*d^2*cos(8*b*x + 8*a) + 2*I*d^2*cos(4*b*x + 4*a) + d^2*sin(8*b*x + 8*a) - 2*d^2*sin(4*b*x + 4*a
) - I*d^2)*polylog(3, -e^(I*b*x + I*a)) - 8*(-I*d^2*cos(8*b*x + 8*a) + 2*I*d^2*cos(4*b*x + 4*a) + d^2*sin(8*b*
x + 8*a) - 2*d^2*sin(4*b*x + 4*a) - I*d^2)*polylog(3, e^(I*b*x + I*a)) - 8*((b*x + a)^2*d^2 - I*b*c*d + I*a*d^
2 + (2*b*c*d - (2*a + I)*d^2)*(b*x + a))*sin(6*b*x + 6*a) - 8*((b*x + a)^2*d^2 + I*b*c*d - I*a*d^2 + (2*b*c*d
- (2*a - I)*d^2)*(b*x + a))*sin(2*b*x + 2*a))/(-2*I*b^2*cos(8*b*x + 8*a) + 4*I*b^2*cos(4*b*x + 4*a) + 2*b^2*si
n(8*b*x + 8*a) - 4*b^2*sin(4*b*x + 4*a) - 2*I*b^2))/b
Giac [F]
\[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=\int { {\left (d x + c\right )}^{2} \csc \left (b x + a\right )^{3} \sec \left (b x + a\right )^{3} \,d x }
\]
[In]
integrate((d*x+c)^2*csc(b*x+a)^3*sec(b*x+a)^3,x, algorithm="giac")
[Out]
integrate((d*x + c)^2*csc(b*x + a)^3*sec(b*x + a)^3, x)
Mupad [F(-1)]
Timed out. \[
\int (c+d x)^2 \csc ^3(a+b x) \sec ^3(a+b x) \, dx=\text {Hanged}
\]
[In]
int((c + d*x)^2/(cos(a + b*x)^3*sin(a + b*x)^3),x)
[Out]
\text{Hanged}